<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Simple Vue</title>
</head>

<body>
    <div id="app">
        <h1>{{ msg }}</h1>
        <input type="text" v-model="msg">
        <button v-on:click="handleClick">v-on:click</button>
        <button @click="handleClick">@click</button>
    </div>
    <script src="./simple-vue.js"></script>
    <script>
        const vm = new Vue({
            el: '#app',
            data() {
                return {
                    msg: 'hello world'
                }
            },
            methods: {
                handleClick() {
                    console.log(this);
                    this.msg = new Date().getTime();
                }
            }
        });
        // console.log(vm.msg);
        vm.msg = 'something';
    </script>
</body>

</html>